import { createReactive } from '../../vue'

const template = `
  <ul class="list">
    <h1>{{ title }}</h1>
    {{ dateTime }}
    <!-- 个人设置的标签for -->
    <for data="list" tag="li" class="item">
      <span>姓名: { name }</span>
      <span>年龄: { age }</span>
    </for>
  </ul>
`

function TestB() {
  const state = createReactive({
    title: '学生信息列表',
    dateTime: '2021-02-03 10:23',
    list: [
      {
        id: 1,
        name: '张珊',
        age: 18
      }, {
        id: 2,
        name: '李四',
        age: 12
      }, {
        id: 3,
        name: '王五',
        age: 28
      }
    ]
  })

  return [template, state]
}

export default TestB